package presencial2014;
import java.util.Scanner;

public class E {

	@SuppressWarnings("resource")
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		long nCasos = in.nextInt();
		for (long i = 0; i < nCasos; i++) {
			int n = in.nextInt();
			int mayor = in.nextInt();
			int dif = in.nextInt();
			long acc = 0;
			for (int j = 0; j < n; j++) {
				acc += mayor;
				mayor -= dif;
			}
			System.out.println(acc);
		}

	}

}
